package os.t1;

/**
 * 进程对象
 * 属性；作业名，作业的服务时间，作业的到达时间，作业的状态
 * 待计算的属性：作业开始时间，作业结束时间，作业的周转时间，作业的带权周转时间，作业的等待时间
 */
public class Process {
    private String jobName;
    private double serviceTime;
    private double arriveTime;
    private int status;

    private double jobStartTime;//作业开始执行的时间
    private double jobEndTime;//作业的结束时间
    private double jobTurnOverTime;//作业的周庄时间
    private double jobWeightedTurnOverTime;//作业的带权周转时间
    private double jobWaitTime;//作业的等待时间

    public double getPriority() {
        return priority;
    }

    public void setPriority(double priority) {
        this.priority = priority;
    }

    private double priority=0;//优先级

    public Process(String jobName, double serviceTime, double arriveTime, int status) {
        this.jobName = jobName;
        this.serviceTime = serviceTime;
        this.arriveTime = arriveTime;
        this.status = status;
    }

    @Override
    public String toString() {
        return "作业{" +
                "作业名='" + jobName + '\'' +
                ", 服务时间=" + serviceTime +
                ", 到达时间=" + arriveTime +
                ", 状态=" + status +
                ", 开始时间=" + jobStartTime +
                ", 结束时间=" + jobEndTime +
                ", 周转时间=" + jobTurnOverTime +
                ", 带权周转时间=" + jobWeightedTurnOverTime +
                ", 等待时间=" + jobWaitTime +
                ", 优先级=" + priority+
                '}';
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public double getServiceTime() {
        return serviceTime;
    }

    public void setServiceTime(Float serviceTime) {
        this.serviceTime = serviceTime;
    }

    public double getArriveTime() {
        return arriveTime;
    }

    public void setArriveTime(Float arriveTime) {
        this.arriveTime = arriveTime;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public void setServiceTime(double serviceTime) {
        this.serviceTime = serviceTime;
    }

    public void setArriveTime(double arriveTime) {
        this.arriveTime = arriveTime;
    }

    public double getJobStartTime() {
        return jobStartTime;
    }

    public void setJobStartTime(double jobStartTime) {
        this.jobStartTime = jobStartTime;
    }

    public double getJobEndTime() {
        return jobEndTime;
    }

    public void setJobEndTime(double jobEndTime) {
        this.jobEndTime = jobEndTime;
    }

    public double getJobTurnOverTime() {
        return jobTurnOverTime;
    }

    public void setJobTurnOverTime(double jobTurnOverTime) {
        this.jobTurnOverTime = jobTurnOverTime;
    }

    public double getJobWeightedTurnOverTime() {
        return jobWeightedTurnOverTime;
    }

    public void setJobWeightedTurnOverTime(double jobWeightedTurnOverTime) {
        this.jobWeightedTurnOverTime = jobWeightedTurnOverTime;
    }

    public double getJobWaitTime() {
        return jobWaitTime;
    }

    public void setJobWaitTime(double jobWaitTime) {
        this.jobWaitTime = jobWaitTime;
    }
}
